home *** CD-ROM | disk | FTP | other *** search
/ Language/OS - Multiplatform Resource Library / LANGUAGE OS.iso / p4 / p4-1_2c.lha / p4-1.2c / lib_f / p4_fmaster.c < prev    next >
C/C++ Source or Header  |  1993-05-24  |  750b  |  41 lines

  1.  
  2. #include "p4.h"
  3. #include "p4_sys.h"
  4. #include "p4_fort.h"
  5.  
  6. VOID p4init_()
  7. {
  8.     int argidx = 0;
  9.     char *argv[20];
  10.     char *q;
  11.     int argcnt;
  12.     
  13.     /*  DO NOT do any dprintfl's until after the p4_initenv below */
  14.     numargc_(&argcnt);
  15.     while (argidx < argcnt)
  16.     {
  17.         q = (char *)malloc(200);
  18.         /* args Fortran subroutine */
  19.         fflush(stdout);
  20.         args_(&argidx,q);
  21.         argv[argidx] = q;
  22.         q = (char *)index(argv[argidx],' ');
  23.         *q = '\0';
  24.         ++argidx;
  25.     }
  26.     p4_initenv(&argidx,argv);
  27.     p4_dprintfl(30, "exit fortran p4init\n");
  28. }
  29.  
  30. VOID p4crpg_()
  31. {
  32.     if (p4_create_procgroup() < 0)
  33.         p4_error("p4crpg_: p4_create_procgroup failed",0);
  34. }
  35.  
  36. VOID p4cleanup_()
  37. {
  38.     p4_wait_for_end();
  39. }
  40.  
  41.